import request from '@/utils/request'
import {getToken} from "@/utils/auth";

// 查询后台导航管理系统信息列表
export function getqueryNavigations() {
  return request({
    url: '/navigation/queryNavigations',
    method: 'post',
  })
}
// 新增后台导航管理系统信息
export function addNetworkDeviceMgmt(data) {
  return request({
    url: '/navigation/addNavigation',
    method: 'post',
    data: data,
  })
}
// 查询用户
export function getEmpById(empId) {
  return request({
    url: '/system/user/getEmpById/' + empId,
    method: 'get'
  })
}
// 删除导航信息管理
export function delmangentMgmt(systemId) {
  const data = {systemId}
  return request({
    url: '/navigation/delSystemInfo',
    method: 'post',
    headers:{
      'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8',
      Authorization: "Bearer" + getToken()
    },
    params: data
  })
}
// 用户状态修改status status
export function changeUserStatus(systemId) {
  console.log("用户状态修改",systemId);
  return request({
    url: '/navigation/updateStatus',
    method: 'post',
    data: systemId
  })
}
// 查询详情
export function queryNavigationInfo(systemId) {
  const data = {systemId}
  return request({
    url: '/navigation/queryNavigationInfo',
    method: 'post',
    data: data
  })
}
// 移交按钮触发事件
export function updateFounderBtn(emp,updateEmp,systemId) {
  const data = {emp,updateEmp,systemId}
  return request({
    url: '/navigation/updateFounder',
    method: 'post',
    headers:{
      'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8',
      Authorization: "Bearer " + getToken()
    },
    params: data
  })
}
// 新增用户
export function adduserMgmt(data) {
  return request({
    url: '/navigation/addNavigation',
    method: 'post',
    data: data
  })
}
// 修改用户
export function updateuserMgmt(data) {
  return request({
    url: '/navigation/addNavigation',
    method: 'post',
    data: data
  })
}
// 保存导航图片
export function saveImg(data) {
  return request({
    url: '/navigation/saveImg',
    method: 'post',
    data: data
  })
}
// 导航预览搜索
export function querySystemInfoByEmpNo(data) {
  return request({
    url: '/info/querySystemInfoByEmpNo',
    method: 'post',
    data: data
  })
}